package cn.dalegate;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by jt on 2018/3/15.
 */
public class Father implements ITarget{
    Map<String,ITarget> map = new HashMap<>() ;

    public Father(){
        map.put("拖地",new Son1()) ;
        map.put("洗碗",new Son2()) ;
    }

    @Override
    public void doing(String command) {

        this.map.get(command).doing(command) ;

    }
}
